using System;
using Sce.PlayStation.Core;

namespace Nyanimals
{
    /// <summary>
    /// Base class for objects that are selectable in the world.
    /// I.E signs, terminals, etc
    /// </summary>
    public abstract class CBaseSelectable : CBaseObject
    {
        protected CollisionShape collision;
        
        #region properties
        public CollisionShape Collision
        {
            get { return collision;}
        }
        #endregion
        
        public CBaseSelectable() : base()
        { 
        }
        
        public virtual Matrix4 WorldMatrix
        {
            get { return context.WorldMatrix;}
            set 
           { 
               context.WorldMatrix = value;
               collision.Position = context.WorldMatrix.AxisW;
           }
        }
        
        public override ObjectTypes Type
        {
            get { return ObjectTypes.Selectable_Object;}
        }
        
        public virtual SelectableTypes SelectableType
        {
            get { return SelectableTypes.Base_Selectable;}
        }

        /// <summary>
        /// Handles when the player communicates with this object.
        /// </summary>
        /// <param name='obj'>
        /// Object player is holding.  null if empty handed
        /// </param>
        public abstract void HandleCommunication(CBaseObject obj);

  
    }
}

